package com.ruoyi.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ruoyi.domain.SysDept;

public interface SysDeptMapper {

	List<SysDept> selectDeptList(SysDept dept);

	SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);

	SysDept selectDeptById(Long deptId);

    int insertDept(SysDept dept);

	int selectNormalChildrenDeptById(Long deptId);

	List<SysDept> selectChildrenDeptById(Long deptId);

	int updateDeptChildren(List<SysDept> depts);

	int updateDept(SysDept dept);

	void updateDeptStatusNormal(Long[] deptIds);

	int deleteDeptById(Long deptId);

	int hasChildByDeptId(Long deptId);

	int checkDeptExistUser(Long deptId);
	
}
